using Engine.OldSerialization;

namespace RuthlessConquest {
    public class GameDescription {
        public class Serializer : ISerializer<GameDescription> {
            public void Serialize(InputArchive archive, ref GameDescription value) {
                value = new GameDescription();
                archive.Serialize("GameId", ref value.GameId);
                archive.Serialize("HumanPlayersCount", ref value.HumanPlayersCount);
                archive.Serialize("SpectatorsCount", ref value.SpectatorsCount);
                archive.Serialize("TicksSinceStart", ref value.TicksSinceStart);
                archive.Serialize("CreationParameters", ref value.CreationParameters);
                archive.Serialize("GameImage", ref value.GameImage);
            }

            public void Serialize(OutputArchive archive, GameDescription value) {
                archive.Serialize("GameId", value.GameId);
                archive.Serialize("HumanPlayersCount", value.HumanPlayersCount);
                archive.Serialize("SpectatorsCount", value.SpectatorsCount);
                archive.Serialize("TicksSinceStart", value.TicksSinceStart);
                archive.Serialize("CreationParameters", value.CreationParameters);
                archive.Serialize("GameImage", value.GameImage);
            }
        }

        public ServerDescription ServerDescription;

        public int GameId;

        public int HumanPlayersCount;

        public int SpectatorsCount;

        public int TicksSinceStart;

        public GameCreationParameters CreationParameters;

        public GameImage GameImage;
    }
}